package com.bloveoacom.weichi.bean;

import com.chad.library.adapter.base.entity.MultiItemEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * author: zhu.px
 * e-mail: 1271901673@qq.com
 * time  : 2018/7/10
 * desc  : 帖子
 */
public class NewsPostBean implements MultiItemEntity {
    public String coinBarName;
    public String lastCommentTime;
    private String commentnum;

    public String isOver;

    public String coinId;
    private String content;
    private String fans;
    private String giveLikeNum;
    private String headerImg;
    public String headImg;
    private String image;

    public String nowEmtNum;
    public String commentNum;

    public String userIdentity;
    public String images;

    public String url;
    private String isGiveLike;
    private String title;
    public String isTop;

    public int tuNum;
    public int againstNum;
    public int supportNum;
    public int emtNum;
    public int isReview;
    public int isVote;
    public String type;


    //微博数据

    public String createTime;
    public String id;
    public String userId;

    public String userName;

    public int isCanTicket;
    public int activityStatus;
    public int saleTicketsStatus;
    public String posters;
    public String activityId;
    public String orderId ;

    public boolean getIsCanTicket() {
        return isCanTicket==0&&saleTicketsStatus==1;
    }
    public int getTuNum() {
        return tuNum;
    }


    public String getCommentnum() {
        return commentnum;
    }

    public void setCommentnum(String commentnum) {
        this.commentnum = commentnum;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getFans() {
        return fans;
    }

    public void setFans(String fans) {
        this.fans = fans;
    }

    public String getGiveLikeNum() {
        return giveLikeNum;
    }

    public void setGiveLikeNum(String giveLikeNum) {
        this.giveLikeNum = giveLikeNum;
    }

    public String getHeaderImg() {
        return headerImg;
    }

    public void setHeaderImg(String headerImg) {
        this.headerImg = headerImg;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getIsGiveLike() {
        return isGiveLike;
    }

    public void setIsGiveLike(String isGiveLike) {
        this.isGiveLike = isGiveLike;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Override
    public int getItemType() {
        return "1".equals(isTop)?1:0;
    }

    public static List<NewsPostBean> getFromAc(List<ActivitysBean> beans){
        List<NewsPostBean> das = new ArrayList<>();
        if(beans==null){
            return das;
        }
        for (ActivitysBean bean : beans) {
             NewsPostBean newsPostBean = new NewsPostBean();
             newsPostBean.activityStatus = bean.getActivityStatus();
             newsPostBean.activityId = bean.getActivityId();
             newsPostBean. isCanTicket= bean.isCanTicket;
             newsPostBean.posters = bean.posters;
             newsPostBean.saleTicketsStatus = bean.saleTicketsStatus;
             das.add(newsPostBean);
        }
        return das;
    }
}
